package org.shan.lf.sever.controller;

import com.mlnx.common.entity.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.shan.lf.service.UserService;
import org.shan.spring.base.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.ServletException;
import java.io.IOException;

/**
 * Created by amanda.shan on 2019-07-28.
 */
@Api(value = "管理端用户接口", tags={"管理端用户接口"})
@RestController
@RequestMapping("/admin")
public class AdminController extends BaseController {

    @Autowired
    private UserService userService;


    @ApiOperation(value="获取邀请码", notes="")
    @GetMapping("/code")
    public Response getCode() throws ServletException, IOException {

        return result(userService.getCode());
    }
}
